<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
  <meta charset="utf-8">
  <title>hls.js</title>
<!--  <link rel="stylesheet" href="./index.css">-->
  <script src="https://cdn.jsdelivr.net/npm/hls.js@latest"></script>
</head>
<body>
<video id="video" controls></video>
<!--<script src="./index.js" charset="utf-8"></script>-->
</body>
<script>
  window.onload = function (){
    var video = document.getElementById("video")
    var Hls = window.Hls
    var url = 'http://cmgw-vpc.lechange.com:8888/LCO/6F07C28PAG162C6/0/0/20220424T064003/e0ab9a63f840d7a4658098651943fa38.m3u8'
    if (Hls.isSupported()) {
      var hls = new Hls()
      hls.loadSource(url)
      hls.attachMedia(video)
      hls.on(Hls.Events.MANIFEST_PARSED, function () {
        video.play()
        console.log("play =====================")
      })
    } else if (video.canPlayType('application/vnd.apple.mpegurl')) {
      video.src = url
      video.addEventListener('canplay', function () {
        video.play()
      })
    }
  }
</script>
</html>
